package com.ruoyi.tranShort.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tranShort.mapper.ShortSchedulingDateMapper;
import com.ruoyi.tranShort.domain.ShortSchedulingDate;
import com.ruoyi.tranShort.service.IShortSchedulingDateService;

/**
 * 排班日期Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-14
 */
@Service
public class ShortSchedulingDateServiceImpl implements IShortSchedulingDateService 
{
    @Autowired
    private ShortSchedulingDateMapper shortSchedulingDateMapper;

    /**
     * 查询排班日期
     * 
     * @param id 排班日期主键
     * @return 排班日期
     */
    @Override
    public ShortSchedulingDate selectShortSchedulingDateById(Long id)
    {
        return shortSchedulingDateMapper.selectShortSchedulingDateById(id);
    }

    /**
     * 查询排班日期列表
     * 
     * @param shortSchedulingDate 排班日期
     * @return 排班日期
     */
    @Override
    public List<ShortSchedulingDate> selectShortSchedulingDateList(ShortSchedulingDate shortSchedulingDate)
    {
        return shortSchedulingDateMapper.selectShortSchedulingDateList(shortSchedulingDate);
    }

    /**
     * 新增排班日期
     * 
     * @param shortSchedulingDate 排班日期
     * @return 结果
     */
    @Override
    public int insertShortSchedulingDate(ShortSchedulingDate shortSchedulingDate)
    {
        shortSchedulingDate.setCreateTime(DateUtils.getNowDate());
        return shortSchedulingDateMapper.insertShortSchedulingDate(shortSchedulingDate);
    }

    /**
     * 修改排班日期
     * 
     * @param shortSchedulingDate 排班日期
     * @return 结果
     */
    @Override
    public int updateShortSchedulingDate(ShortSchedulingDate shortSchedulingDate)
    {
        return shortSchedulingDateMapper.updateShortSchedulingDate(shortSchedulingDate);
    }

    /**
     * 批量删除排班日期
     * 
     * @param ids 需要删除的排班日期主键
     * @return 结果
     */
    @Override
    public int deleteShortSchedulingDateByIds(Long[] ids)
    {
        return shortSchedulingDateMapper.deleteShortSchedulingDateByIds(ids);
    }

    /**
     * 删除排班日期信息
     * 
     * @param id 排班日期主键
     * @return 结果
     */
    @Override
    public int deleteShortSchedulingDateById(Long id)
    {
        return shortSchedulingDateMapper.deleteShortSchedulingDateById(id);
    }
}
